home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch7m < prev    next >
Encoding:
Internet Message Format  |  1990-02-26  |  57.4 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i013:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch7m
  5. Message-ID: <5227@tekred.CNA.TEK.COM>
  6. Date: 24 Feb 90 00:56:09 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2114
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 9, Issue 13
  13. Archive-name: NetHack3/Patch7m
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 13 (of 30)."
  25. # Contents:  patch7.09
  26. # Wrapped by billr@saab on Wed Feb 21 10:04:34 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch7.09' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patch7.09'\" to \"'patch7.09.orig'\"
  30.   mv -f 'patch7.09' 'patch7.09.orig'
  31. fi
  32. echo shar: Extracting \"'patch7.09'\" \(54742 characters\)
  33. sed "s/^X//" >'patch7.09' <<'END_OF_FILE'
  34. X*** src/Old/u_init.c    Mon Feb 19 19:05:03 1990
  35. X--- src/u_init.c    Fri Feb 16 18:59:15 1990
  36. X***************
  37. X*** 14,25 ****
  38. X  };
  39. X  
  40. X  static void FDECL(ini_inv, (struct trobj *));
  41. X  
  42. X  #define    UNDEF_TYP    0
  43. X  #define    UNDEF_SPE    '\177'
  44. X  #define    UNDEF_BLESS    2
  45. X  
  46. X! char *(roles[]) = {    /* must all have distinct first letter */
  47. X              /* roles[2] and [6] are changed for females */
  48. X              /* in all cases, the corresponding male and female */
  49. X              /* roles must start with the same letter */
  50. X--- 14,27 ----
  51. X  };
  52. X  
  53. X  static void FDECL(ini_inv, (struct trobj *));
  54. X+ static void FDECL(knows_class,(CHAR_P));
  55. X+ static int FDECL(role_index,(CHAR_P));
  56. X  
  57. X  #define    UNDEF_TYP    0
  58. X  #define    UNDEF_SPE    '\177'
  59. X  #define    UNDEF_BLESS    2
  60. X  
  61. X! const char *(roles[]) = {    /* must all have distinct first letter */
  62. X              /* roles[2] and [6] are changed for females */
  63. X              /* in all cases, the corresponding male and female */
  64. X              /* roles must start with the same letter */
  65. X***************
  66. X*** 235,241 ****
  67. X  role_index(pc)
  68. X  char pc;
  69. X  {
  70. X!     register char *cp;
  71. X  
  72. X      if(cp = index(pl_classes, pc))
  73. X          return(cp - pl_classes);
  74. X--- 237,243 ----
  75. X  role_index(pc)
  76. X  char pc;
  77. X  {
  78. X!     register const char *cp;
  79. X  
  80. X      if(cp = index(pl_classes, pc))
  81. X          return(cp - pl_classes);
  82. X***************
  83. X*** 247,254 ****
  84. X  {
  85. X      register int i;
  86. X      char pick, pc;
  87. X! 
  88. X!     Printf("\nNetHack, Copyright 1985, 1986, 1987, 1988, 1989.");
  89. X      Printf("\n         By Stichting Mathematisch Centrum and M. Stephenson.");
  90. X      Printf("\n         See license for details.\n\n");
  91. X  
  92. X--- 249,258 ----
  93. X  {
  94. X      register int i;
  95. X      char pick, pc;
  96. X! #ifdef __GNULINT__
  97. X!     pick = i = 0;    /* prevent "used before set" warnings */
  98. X! #endif
  99. X!     Printf("\nNetHack, Copyright 1985, 1986, 1987, 1988, 1989, 1990.");
  100. X      Printf("\n         By Stichting Mathematisch Centrum and M. Stephenson.");
  101. X      Printf("\n         See license for details.\n\n");
  102. X  
  103. X***************
  104. X*** 265,270 ****
  105. X--- 269,276 ----
  106. X          pl_character[0] = pc = 0;
  107. X      }
  108. X  
  109. X+ #ifndef MACOS
  110. X+ 
  111. X      Printf("\nShall I pick a character for you? [Y,N, or Q(quit)] ");
  112. X  
  113. X      while(!index("yYnNqQ", (pick = readchar())) && !index(quitchars, pick))
  114. X***************
  115. X*** 314,319 ****
  116. X--- 320,329 ----
  117. X      }
  118. X      if(pc == '\n')    pc = 0;
  119. X  
  120. X+ #else
  121. X+     flags.wantspace = FALSE;
  122. X+ #endif /* MACOS */
  123. X+ 
  124. X  beginner:
  125. X      if(!pc) {
  126. X          i = rn2(SIZE(roles));
  127. X***************
  128. X*** 337,343 ****
  129. X  
  130. X      u.ulevel = 0;    /* set up some of the initial attributes */
  131. X      u.uhp = u.uhpmax = newhp();
  132. X!     adjabil(1);
  133. X      u.ulevel = 1;
  134. X  
  135. X      u.uluck  = u.moreluck = 0;
  136. X--- 347,353 ----
  137. X  
  138. X      u.ulevel = 0;    /* set up some of the initial attributes */
  139. X      u.uhp = u.uhpmax = newhp();
  140. X!     adjabil(0,1);
  141. X      u.ulevel = 1;
  142. X  
  143. X      u.uluck  = u.moreluck = 0;
  144. X***************
  145. X*** 469,479 ****
  146. X      case 'S':
  147. X          ini_inv(Samurai);
  148. X          if(!rn2(5)) ini_inv(Blindfold);
  149. X-         objects[SHORT_SWORD].oc_name = "wakizashi";
  150. X-         objects[BROADSWORD].oc_name = "ninja-to";
  151. X-         objects[GLAIVE].oc_name = "naginata";
  152. X-         /* objects[BOW].oc_name = "yumi"; */
  153. X-         objects[LOCK_PICK].oc_name = "osaku";
  154. X          knows_class(WEAPON_SYM);
  155. X          break;
  156. X      case 'P':
  157. X--- 479,484 ----
  158. X*** src/Old/uhitm.c    Mon Feb 19 19:05:35 1990
  159. X--- src/uhitm.c    Sun Feb  4 09:46:50 1990
  160. X***************
  161. X*** 1,4 ****
  162. X! /*    SCCS Id: @(#)uhitm.c    3.0    89/11/19
  163. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  164. X  /* NetHack may be freely redistributed.  See license for details. */
  165. X  
  166. X--- 1,4 ----
  167. X! /*    SCCS Id: @(#)uhitm.c    3.0    89/11/27
  168. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  169. X  /* NetHack may be freely redistributed.  See license for details. */
  170. X  
  171. X***************
  172. X*** 11,16 ****
  173. X--- 11,17 ----
  174. X  #ifdef POLYSELF
  175. X  static boolean hmonas();
  176. X  #endif
  177. X+ static void nohandglow();
  178. X  
  179. X  #ifdef WORM
  180. X  extern boolean notonhead;
  181. X***************
  182. X*** 77,85 ****
  183. X--- 78,93 ----
  184. X          && !Hallucination && (!mtmp->mhide || !mtmp->mundetected)
  185. X          && (!mtmp->mimic || Protection_from_shape_changers)) {
  186. X          if (Blind ? Telepat : (!mtmp->minvis || See_invisible)) {
  187. X+ #ifdef MACOS
  188. X+             char mac_tbuf[80];
  189. X+             if(!flags.silent) SysBeep(1);
  190. X+             sprintf(mac_tbuf, "Really attack %s?", mon_nam(mtmp));
  191. X+             if(UseMacAlertText(128, mac_tbuf) != 1) {
  192. X+ #else
  193. X              pline("Really attack %s? ", mon_nam(mtmp));
  194. X              (void) fflush(stdout);
  195. X              if (yn() != 'y') {
  196. X+ #endif
  197. X                  flags.move = 0;
  198. X                  return(TRUE);
  199. X              }
  200. X***************
  201. X*** 126,132 ****
  202. X  #endif
  203. X  /*    it is unchivalrous to attack the defenseless or from behind */
  204. X      if (pl_character[0] == 'K' && u.ualigntyp == U_LAWFUL &&
  205. X!         (mtmp->mfroz || mtmp->msleep || mtmp->mflee) &&
  206. X          u.ualign > -10) adjalign(-1);
  207. X  
  208. X  /*    Adjust vs. (and possibly modify) monster state.        */
  209. X--- 134,140 ----
  210. X  #endif
  211. X  /*    it is unchivalrous to attack the defenseless or from behind */
  212. X      if (pl_character[0] == 'K' && u.ualigntyp == U_LAWFUL &&
  213. X!         (!mtmp->mcanmove || mtmp->msleep || mtmp->mflee) &&
  214. X          u.ualign > -10) adjalign(-1);
  215. X  
  216. X  /*    Adjust vs. (and possibly modify) monster state.        */
  217. X***************
  218. X*** 138,146 ****
  219. X          mtmp->msleep = 0;
  220. X          tmp += 2;
  221. X      }
  222. X!     if(mtmp->mfroz) {
  223. X          tmp += 4;
  224. X!         if(!rn2(10)) mtmp->mfroz = 0;
  225. X      }
  226. X      if (is_orc(mtmp->data) && pl_character[0]=='E') tmp++;
  227. X  
  228. X--- 146,157 ----
  229. X          mtmp->msleep = 0;
  230. X          tmp += 2;
  231. X      }
  232. X!     if(!mtmp->mcanmove) {
  233. X          tmp += 4;
  234. X!         if(!rn2(10)) {
  235. X!             mtmp->mcanmove = 1;
  236. X!             mtmp->mfrozen = 0;
  237. X!         }
  238. X      }
  239. X      if (is_orc(mtmp->data) && pl_character[0]=='E') tmp++;
  240. X  
  241. X***************
  242. X*** 184,190 ****
  243. X      /* andrew@orca: prevent unlimited pick-axe attacks */
  244. X      u_wipe_engr(3);
  245. X  
  246. X!     if(mdat->mlet == S_LEPRECHAUN && !mtmp->mfroz && !mtmp->msleep &&
  247. X         !mtmp->mconf && mtmp->mcansee && !rn2(7) &&
  248. X         (m_move(mtmp, 0) == 2 ||                /* he died */
  249. X         mtmp->mx != u.ux+u.dx || mtmp->my != u.uy+u.dy)) /* he moved */
  250. X--- 195,201 ----
  251. X      /* andrew@orca: prevent unlimited pick-axe attacks */
  252. X      u_wipe_engr(3);
  253. X  
  254. X!     if(mdat->mlet == S_LEPRECHAUN && mtmp->mfrozen && !mtmp->msleep &&
  255. X         !mtmp->mconf && mtmp->mcansee && !rn2(7) &&
  256. X         (m_move(mtmp, 0) == 2 ||                /* he died */
  257. X         mtmp->mx != u.ux+u.dx || mtmp->my != u.uy+u.dy)) /* he moved */
  258. X***************
  259. X*** 196,203 ****
  260. X       * cinating.
  261. X       */
  262. X      /*  changes by wwp 5/16/85 */
  263. X!     if (!Blind && !Confusion && !Hallucination && flags.safe_dog &&
  264. X!         (mdat->mlet == S_DOG || mdat->mlet == S_FELINE) && mtmp->mtame) {
  265. X          mtmp->mflee = 1;
  266. X          mtmp->mfleetim = rnd(6);
  267. X          if (mtmp->mnamelth)
  268. X--- 207,215 ----
  269. X       * cinating.
  270. X       */
  271. X      /*  changes by wwp 5/16/85 */
  272. X!     if (!Confusion && !Hallucination && flags.safe_dog &&
  273. X!         (Blind ? Telepat : (!mtmp->minvis || See_invisible)) &&
  274. X!                                 mtmp->mtame) {
  275. X          mtmp->mflee = 1;
  276. X          mtmp->mfleetim = rnd(6);
  277. X          if (mtmp->mnamelth)
  278. X***************
  279. X*** 245,251 ****
  280. X      if(!mhit) {
  281. X          if(!Blind && flags.verbose) You("miss %s.", mon_nam(mon));
  282. X          else            You("miss it.");
  283. X!         if(!mon->msleep && !mon->mfroz)
  284. X          wakeup(mon);
  285. X      } else {
  286. X          /* we hit the monster; be careful: it might die! */
  287. X--- 257,263 ----
  288. X      if(!mhit) {
  289. X          if(!Blind && flags.verbose) You("miss %s.", mon_nam(mon));
  290. X          else            You("miss it.");
  291. X!         if(!mon->msleep && mon->mcanmove)
  292. X          wakeup(mon);
  293. X      } else {
  294. X          /* we hit the monster; be careful: it might die! */
  295. X***************
  296. X*** 299,304 ****
  297. X--- 311,317 ----
  298. X  register int thrown;
  299. X  {
  300. X      register int tmp;
  301. X+     struct permonst *mdat = mon->data;
  302. X      /* Why all these booleans?  This stuff has to be done in the
  303. X       *      following order:
  304. X       * 1) Know what we're attacking with, and print special hittxt for
  305. X***************
  306. X*** 313,319 ****
  307. X--- 326,334 ----
  308. X       *    kill poison
  309. X       * 5) Print hit message (depends on 1 and 4)
  310. X       * 6a) Print poison message (must be done after 5)
  311. X+ #if 0
  312. X       * 6b) Rust weapon (must be done after 5)
  313. X+ #endif
  314. X       * 7) Possibly kill monster (must be done after 6a, 6b)
  315. X       * 8) Instant-kill from poison (can happen anywhere between 5 and 9)
  316. X       * 9) Hands not glowing (must be done after 7 and 8)
  317. X***************
  318. X*** 330,336 ****
  319. X      wakeup(mon);
  320. X      if(!obj) {
  321. X          tmp = rnd(2);    /* attack with bare hands */
  322. X!         if(mon->data == &mons[PM_COCKATRICE] && !uarmg
  323. X  #ifdef POLYSELF
  324. X          && !resists_ston(uasmon)
  325. X  #endif
  326. X--- 345,352 ----
  327. X      wakeup(mon);
  328. X      if(!obj) {
  329. X          tmp = rnd(2);    /* attack with bare hands */
  330. X! #if 0
  331. X!         if(mdat == &mons[PM_COCKATRICE] && !uarmg
  332. X  #ifdef POLYSELF
  333. X          && !resists_ston(uasmon)
  334. X  #endif
  335. X***************
  336. X*** 342,359 ****
  337. X          done_in_by(mon);
  338. X          hittxt = TRUE; /* maybe lifesaved */
  339. X          }
  340. X      } else {
  341. X          if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  342. X             obj->otyp == UNICORN_HORN || obj->olet == ROCK_SYM) {
  343. X  
  344. X!         if(obj == uwep && (obj->otyp > VOULGE || obj->otyp < BOOMERANG)
  345. X              && obj->otyp != PICK_AXE && obj->otyp != UNICORN_HORN)
  346. X              tmp = rnd(2);
  347. X          else {
  348. X!             tmp = dmgval(obj, mon->data);
  349. X  #ifdef NAMED_ITEMS
  350. X!             if(spec_ability(obj, SPFX_DRLI) &&
  351. X!                         !resists_drli(mon->data)) {
  352. X              if (!Blind) {
  353. X                  pline("The %s blade draws the life from %s!",
  354. X                  Hallucination ? hcolor() : black,
  355. X--- 358,375 ----
  356. X          done_in_by(mon);
  357. X          hittxt = TRUE; /* maybe lifesaved */
  358. X          }
  359. X+ #endif
  360. X      } else {
  361. X          if(obj->olet == WEAPON_SYM || obj->otyp == PICK_AXE ||
  362. X             obj->otyp == UNICORN_HORN || obj->olet == ROCK_SYM) {
  363. X  
  364. X!         if(obj == uwep && (obj->otyp >= BOW || obj->otyp < BOOMERANG)
  365. X              && obj->otyp != PICK_AXE && obj->otyp != UNICORN_HORN)
  366. X              tmp = rnd(2);
  367. X          else {
  368. X!             tmp = dmgval(obj, mdat);
  369. X  #ifdef NAMED_ITEMS
  370. X!             if(spec_ability(obj, SPFX_DRLI) && !resists_drli(mdat)) {
  371. X              if (!Blind) {
  372. X                  pline("The %s blade draws the life from %s!",
  373. X                  Hallucination ? hcolor() : black,
  374. X***************
  375. X*** 385,393 ****
  376. X                  ispoisoned = TRUE;
  377. X              }
  378. X              if(thrown && obj->otyp == SILVER_ARROW) {
  379. X!             if (is_were(mon->data) || mon->data->mlet==S_VAMPIRE
  380. X!                 || (mon->data->mlet==S_IMP && mon->data != &mons[PM_TENGU])
  381. X!                 || is_demon(mon->data)) {
  382. X                  silvermsg = TRUE;
  383. X                  tmp += rnd(20);
  384. X              }
  385. X--- 401,409 ----
  386. X                  ispoisoned = TRUE;
  387. X              }
  388. X              if(thrown && obj->otyp == SILVER_ARROW) {
  389. X!             if (is_were(mdat) || mdat->mlet==S_VAMPIRE
  390. X!                 || (mdat->mlet==S_IMP && mdat != &mons[PM_TENGU])
  391. X!                 || is_demon(mdat)) {
  392. X                  silvermsg = TRUE;
  393. X                  tmp += rnd(20);
  394. X              }
  395. X***************
  396. X*** 410,416 ****
  397. X              You("break your mirror.  That's bad luck!");
  398. X              change_luck(-2);
  399. X              useup(obj);
  400. X!             return(TRUE);
  401. X  #endif
  402. X          case EXPENSIVE_CAMERA:
  403. X      You("succeed in destroying your camera.  Congratulations!");
  404. X--- 426,433 ----
  405. X              You("break your mirror.  That's bad luck!");
  406. X              change_luck(-2);
  407. X              useup(obj);
  408. X!             hittxt = TRUE;
  409. X!             tmp = 1;
  410. X  #endif
  411. X          case EXPENSIVE_CAMERA:
  412. X      You("succeed in destroying your camera.  Congratulations!");
  413. X***************
  414. X*** 420,426 ****
  415. X              if(obj->corpsenm == PM_COCKATRICE) {
  416. X                  kludge("You hit %s with the cockatrice corpse.",
  417. X                    mon_nam(mon));
  418. X!                 if(resists_ston(mon->data)) {
  419. X                  tmp = 1;
  420. X                  hittxt = TRUE;
  421. X                  break;
  422. X--- 437,443 ----
  423. X              if(obj->corpsenm == PM_COCKATRICE) {
  424. X                  kludge("You hit %s with the cockatrice corpse.",
  425. X                    mon_nam(mon));
  426. X!                 if(resists_ston(mdat)) {
  427. X                  tmp = 1;
  428. X                  hittxt = TRUE;
  429. X                  break;
  430. X***************
  431. X*** 428,433 ****
  432. X--- 445,451 ----
  433. X                  kludge("%s turns to stone.", Monnam(mon));
  434. X                  stoned = TRUE;
  435. X                  xkilled(mon,0);
  436. X+                 nohandglow();
  437. X                  return(FALSE);
  438. X              }
  439. X              tmp = mons[obj->corpsenm].msize + 1;
  440. X***************
  441. X*** 435,441 ****
  442. X          case EGG: /* only possible if hand-to-hand */
  443. X              if(obj->corpsenm > -1
  444. X                      && obj->corpsenm != PM_COCKATRICE
  445. X!                     && mon->data==&mons[PM_COCKATRICE]) {
  446. X                  kludge("You hit %s with the %s egg%s.",
  447. X                      mon_nam(mon),
  448. X                      mons[obj->corpsenm].mname,
  449. X--- 453,459 ----
  450. X          case EGG: /* only possible if hand-to-hand */
  451. X              if(obj->corpsenm > -1
  452. X                      && obj->corpsenm != PM_COCKATRICE
  453. X!                     && mdat == &mons[PM_COCKATRICE]) {
  454. X                  kludge("You hit %s with the %s egg%s.",
  455. X                      mon_nam(mon),
  456. X                      mons[obj->corpsenm].mname,
  457. X***************
  458. X*** 451,457 ****
  459. X              tmp = 1;
  460. X              break;
  461. X          case CLOVE_OF_GARLIC:        /* no effect against demons */
  462. X!             if(is_undead(mon->data)) mon->mflee = 1;
  463. X              tmp = 1;
  464. X              break;
  465. X          case CREAM_PIE:
  466. X--- 469,475 ----
  467. X              tmp = 1;
  468. X              break;
  469. X          case CLOVE_OF_GARLIC:        /* no effect against demons */
  470. X!             if(is_undead(mdat)) mon->mflee = 1;
  471. X              tmp = 1;
  472. X              break;
  473. X          case CREAM_PIE:
  474. X***************
  475. X*** 468,475 ****
  476. X              else
  477. X                  pline("The cream pie splashes over %s%s!",
  478. X                  mon_nam(mon),
  479. X!                 (haseyes(mon->data) &&
  480. X!                     mon->data != &mons[PM_FLOATING_EYE])
  481. X                  ? "'s face" : "");
  482. X              if(mon->msleep) mon->msleep = 0;
  483. X              setmangry(mon);
  484. X--- 486,493 ----
  485. X              else
  486. X                  pline("The cream pie splashes over %s%s!",
  487. X                  mon_nam(mon),
  488. X!                 (haseyes(mdat) &&
  489. X!                     mdat != &mons[PM_FLOATING_EYE])
  490. X                  ? "'s face" : "");
  491. X              if(mon->msleep) mon->msleep = 0;
  492. X              setmangry(mon);
  493. X***************
  494. X*** 483,495 ****
  495. X              break;
  496. X  #ifdef POLYSELF
  497. X          case ACID_VENOM: /* only possible if thrown */
  498. X!             if(resists_acid(mon->data)) {
  499. X                  kludge("Your venom hits %s harmlessly.",
  500. X                      mon_nam(mon));
  501. X                  tmp = 0;
  502. X              } else {
  503. X                  kludge("Your venom burns %s!", mon_nam(mon));
  504. X!                 tmp = dmgval(obj, mon->data);
  505. X              }
  506. X              hittxt = TRUE;
  507. X              get_dmg_bonus = FALSE;
  508. X--- 501,513 ----
  509. X              break;
  510. X  #ifdef POLYSELF
  511. X          case ACID_VENOM: /* only possible if thrown */
  512. X!             if(resists_acid(mdat)) {
  513. X                  kludge("Your venom hits %s harmlessly.",
  514. X                      mon_nam(mon));
  515. X                  tmp = 0;
  516. X              } else {
  517. X                  kludge("Your venom burns %s!", mon_nam(mon));
  518. X!                 tmp = dmgval(obj, mdat);
  519. X              }
  520. X              hittxt = TRUE;
  521. X              get_dmg_bonus = FALSE;
  522. X***************
  523. X*** 513,522 ****
  524. X          /* If you throw using a propellor, you don't get a strength
  525. X           * bonus but you do get an increase-damage bonus.
  526. X           */
  527. X!         if(!obj || !uwep ||
  528. X              (obj->olet != GEM_SYM && obj->olet != WEAPON_SYM) ||
  529. X!             objects[obj->otyp].w_propellor !=
  530. X!                 -objects[uwep->otyp].w_propellor)
  531. X              tmp += dbon();
  532. X      }
  533. X  
  534. X--- 531,541 ----
  535. X          /* If you throw using a propellor, you don't get a strength
  536. X           * bonus but you do get an increase-damage bonus.
  537. X           */
  538. X!         if(!thrown || !obj || !uwep ||
  539. X              (obj->olet != GEM_SYM && obj->olet != WEAPON_SYM) ||
  540. X!             !objects[obj->otyp].w_propellor ||
  541. X!             (objects[obj->otyp].w_propellor !=
  542. X!                 -objects[uwep->otyp].w_propellor))
  543. X              tmp += dbon();
  544. X      }
  545. X  
  546. X***************
  547. X*** 530,536 ****
  548. X      }
  549. X   */
  550. X      if (ispoisoned) {
  551. X!         if(resists_poison(mon->data))
  552. X          needpoismsg = TRUE;
  553. X          else if (rn2(10))
  554. X          tmp += rnd(6);
  555. X--- 549,555 ----
  556. X      }
  557. X   */
  558. X      if (ispoisoned) {
  559. X!         if(resists_poison(mdat))
  560. X          needpoismsg = TRUE;
  561. X          else if (rn2(10))
  562. X          tmp += rnd(6);
  563. X***************
  564. X*** 550,558 ****
  565. X          mon->mflee = 1;            /* Rick Richardson */
  566. X          mon->mfleetim += 10*rnd(tmp);
  567. X      }
  568. X!     if((mon->data == &mons[PM_BLACK_PUDDING] ||
  569. X!            mon->data == &mons[PM_BROWN_PUDDING]) && obj &&
  570. X!            obj == uwep && objects[obj->otyp].oc_material == METAL
  571. X             && mon->mhp > 1 && !thrown && !mon->mcan
  572. X             /* && !destroyed  -- guaranteed by mhp > 1 */ ) {
  573. X  
  574. X--- 569,577 ----
  575. X          mon->mflee = 1;            /* Rick Richardson */
  576. X          mon->mfleetim += 10*rnd(tmp);
  577. X      }
  578. X!     if((mdat == &mons[PM_BLACK_PUDDING] || mdat == &mons[PM_BROWN_PUDDING])
  579. X!            && obj && obj == uwep
  580. X!            && objects[obj->otyp].oc_material == METAL
  581. X             && mon->mhp > 1 && !thrown && !mon->mcan
  582. X             /* && !destroyed  -- guaranteed by mhp > 1 */ ) {
  583. X  
  584. X***************
  585. X*** 583,611 ****
  586. X      if (poiskilled) {
  587. X          pline("The poison was deadly...");
  588. X          xkilled(mon, 0);
  589. X          return FALSE;
  590. X!     } else if (destroyed)
  591. X!         killed(mon);    /* takes care of messages */
  592. X!     else if(u.umconf && !thrown) {
  593. X!         if(!Blind) {
  594. X!             Your("%s stop glowing %s.",
  595. X!             makeplural(body_part(HAND)),
  596. X!             Hallucination ? hcolor() : red);
  597. X!         }
  598. X          if(!resist(mon, '+', 0, NOTELL)) mon->mconf = 1;
  599. X!         if(!mon->mstun && !mon->mfroz && !mon->msleep &&
  600. X             !Blind && mon->mconf)
  601. X              pline("%s appears confused.", Monnam(mon));
  602. X-         u.umconf = 0;
  603. X      }
  604. X  
  605. X!     if(mon->data == &mons[PM_RUST_MONSTER] && obj && obj == uwep &&
  606. X          objects[obj->otyp].oc_material == METAL &&
  607. X          obj->olet == WEAPON_SYM && obj->spe > -2) {
  608. X          if(obj->rustfree) {
  609. X          pline("The rust on your %s vanishes instantly!",
  610. X                is_sword(obj) ? "sword" : "weapon");
  611. X!         } else if(obj->blessed && rnl(4))
  612. X          pline("Somehow your %s is not affected!",
  613. X                is_sword(obj) ? "sword" : "weapon");
  614. X          else {
  615. X--- 602,628 ----
  616. X      if (poiskilled) {
  617. X          pline("The poison was deadly...");
  618. X          xkilled(mon, 0);
  619. X+         nohandglow();
  620. X          return FALSE;
  621. X!     } else if (destroyed) {
  622. X!         killed(mon);    /* takes care of most messages */
  623. X!         nohandglow();
  624. X!     } else if(u.umconf && !thrown) {
  625. X!         nohandglow();
  626. X          if(!resist(mon, '+', 0, NOTELL)) mon->mconf = 1;
  627. X!         if(!mon->mstun && mon->mcanmove && !mon->msleep &&
  628. X             !Blind && mon->mconf)
  629. X              pline("%s appears confused.", Monnam(mon));
  630. X      }
  631. X  
  632. X! #if 0
  633. X!     if(mdat == &mons[PM_RUST_MONSTER] && obj && obj == uwep &&
  634. X          objects[obj->otyp].oc_material == METAL &&
  635. X          obj->olet == WEAPON_SYM && obj->spe > -2) {
  636. X          if(obj->rustfree) {
  637. X          pline("The rust on your %s vanishes instantly!",
  638. X                is_sword(obj) ? "sword" : "weapon");
  639. X!         } else if(obj->blessed && !rnl(4))
  640. X          pline("Somehow your %s is not affected!",
  641. X                is_sword(obj) ? "sword" : "weapon");
  642. X          else {
  643. X***************
  644. X*** 613,618 ****
  645. X--- 630,636 ----
  646. X          obj->spe--;
  647. X          }
  648. X      }
  649. X+ #endif
  650. X  
  651. X      return(destroyed ? FALSE : TRUE);
  652. X  }
  653. X***************
  654. X*** 636,643 ****
  655. X          ) {
  656. X          struct monst *dtmp;
  657. X          pline("Some hell-p has arrived!");
  658. X! /*        if((dtmp = makemon(uasmon, u.ux, u.uy)))*/
  659. X!         if((dtmp = makemon(&mons[ndemon()], u.ux, u.uy)))
  660. X          (void)tamedog(dtmp, (struct obj *)0);
  661. X          return(0);
  662. X      }
  663. X--- 654,660 ----
  664. X          ) {
  665. X          struct monst *dtmp;
  666. X          pline("Some hell-p has arrived!");
  667. X!         if((dtmp = makemon(!rn2(6) ? &mons[ndemon()] : uasmon, u.ux, u.uy)))
  668. X          (void)tamedog(dtmp, (struct obj *)0);
  669. X          return(0);
  670. X      }
  671. X***************
  672. X*** 716,722 ****
  673. X              int isize = inv_cnt();
  674. X  
  675. X              stealoid = (struct obj *)0;
  676. X!             if (is_mercenary(pd)) {
  677. X              for(otmp = mdef->minvent; otmp; otmp=otmp->nobj)
  678. X                  if (otmp->otyp >= PLATE_MAIL && otmp->otyp
  679. X                  <= ELVEN_CLOAK) stealoid = otmp;
  680. X--- 733,739 ----
  681. X              int isize = inv_cnt();
  682. X  
  683. X              stealoid = (struct obj *)0;
  684. X!             if(is_mercenary(pd) && could_seduce(&youmonst,mdef,mattk)){
  685. X              for(otmp = mdef->minvent; otmp; otmp=otmp->nobj)
  686. X                  if (otmp->otyp >= PLATE_MAIL && otmp->otyp
  687. X                  <= ELVEN_CLOAK) stealoid = otmp;
  688. X***************
  689. X*** 869,884 ****
  690. X              u.ustuck = mdef; /* it's now stuck to you */
  691. X          break;
  692. X          case AD_PLYS:
  693. X!         if (!mdef->mfroz && !rn2(3) && tmp < mdef->mhp) {
  694. X              if (!Blind) pline("%s is frozen by you!", Monnam(mdef));
  695. X!             mdef->mfroz = 1;
  696. X          }
  697. X          case AD_SLEE:
  698. X          if (!resists_sleep(mdef->data) && !mdef->msleep &&
  699. X!                                 !mdef->mfroz) {
  700. X              if (!Blind)
  701. X              pline("%s suddenly falls asleep!", Monnam(mdef));
  702. X!             mdef->msleep = 1;
  703. X          }
  704. X          break;
  705. X          default:    tmp = 0;
  706. X--- 886,904 ----
  707. X              u.ustuck = mdef; /* it's now stuck to you */
  708. X          break;
  709. X          case AD_PLYS:
  710. X!         if (mdef->mcanmove && !rn2(3) && tmp < mdef->mhp) {
  711. X              if (!Blind) pline("%s is frozen by you!", Monnam(mdef));
  712. X!             mdef->mcanmove = 0;
  713. X!             mdef->mfrozen = rnd(10);
  714. X          }
  715. X+         break;
  716. X          case AD_SLEE:
  717. X          if (!resists_sleep(mdef->data) && !mdef->msleep &&
  718. X!                             mdef->mcanmove) {
  719. X              if (!Blind)
  720. X              pline("%s suddenly falls asleep!", Monnam(mdef));
  721. X!             mdef->mcanmove = 0;
  722. X!             mdef->mfrozen = rnd(10);
  723. X          }
  724. X          break;
  725. X          default:    tmp = 0;
  726. X***************
  727. X*** 910,916 ****
  728. X          case AD_BLND:
  729. X          if(mdef->data->mlet != S_YLIGHT) {
  730. X              kludge("%s is blinded by your flash of light!", Monnam(mdef));
  731. X!             if (!mdef->mblinded) {
  732. X              mdef->mblinded += rn2(25);
  733. X              mdef->mcansee = 0;
  734. X              }
  735. X--- 930,936 ----
  736. X          case AD_BLND:
  737. X          if(mdef->data->mlet != S_YLIGHT) {
  738. X              kludge("%s is blinded by your flash of light!", Monnam(mdef));
  739. X!             if (mdef->mcansee) {
  740. X              mdef->mblinded += rn2(25);
  741. X              mdef->mcansee = 0;
  742. X              }
  743. X***************
  744. X*** 956,964 ****
  745. X       * after exactly 1 round of attack otherwise.  -KAA
  746. X       */
  747. X  
  748. X! # ifdef WORM
  749. X!     if(mdef->wormno) return 0;
  750. X! # endif
  751. X      if(u.uhunger < 1500 && !u.uswallow) {
  752. X  
  753. X          if(mdef->data->mlet != S_COCKATRICE) {
  754. X--- 976,983 ----
  755. X       * after exactly 1 round of attack otherwise.  -KAA
  756. X       */
  757. X  
  758. X!     if(mdef->data->msize >= MZ_HUGE) return 0;
  759. X! 
  760. X      if(u.uhunger < 1500 && !u.uswallow) {
  761. X  
  762. X          if(mdef->data->mlet != S_COCKATRICE) {
  763. X***************
  764. X*** 1046,1061 ****
  765. X              xkilled(mdef,0);
  766. X              return(2);
  767. X          }
  768. X!         kludge("You regurgitate %s!", mon_nam(mdef));
  769. X!         if (Blind)
  770. X!             pline("Obviously, you didn't like its taste.");
  771. X!         else
  772. X!             pline("Obviously, you didn't like %s's taste.",
  773. X                                  mon_nam(mdef));
  774. X          } else {
  775. X          kludge("You bite into %s", mon_nam(mdef));
  776. X          You("turn to stone...");
  777. X!         killer = "poor choice of food";
  778. X          done(STONING);
  779. X          }
  780. X      }
  781. X--- 1065,1084 ----
  782. X              xkilled(mdef,0);
  783. X              return(2);
  784. X          }
  785. X!         kludge("You %s %s!", is_animal(uasmon) ? "regurgitate"
  786. X!             : "expel", mon_nam(mdef));
  787. X!         if (is_animal(uasmon)) {
  788. X!             if (Blind)
  789. X!             pline("Obviously, you didn't like its taste.");
  790. X!             else
  791. X!             pline("Obviously, you didn't like %s's taste.",
  792. X                                  mon_nam(mdef));
  793. X+         }
  794. X          } else {
  795. X          kludge("You bite into %s", mon_nam(mdef));
  796. X          You("turn to stone...");
  797. X!         killer_format = KILLED_BY;
  798. X!         killer = "swallowing a cockatrice whole";
  799. X          done(STONING);
  800. X          }
  801. X      }
  802. X***************
  803. X*** 1134,1141 ****
  804. X                  if (!u.uswallow &&
  805. X                      (compat = could_seduce(&youmonst,
  806. X                                  mon, mattk)))
  807. X!                 pline("You %s %s %s.",
  808. X!                     mon->mblinded ? "talk to" : "smile at",
  809. X                      Blind ? "it" : mon_nam(mon),
  810. X                      compat == 2 ? "engagingly" : "seductively");
  811. X                  else if (mattk->aatyp == AT_KICK)
  812. X--- 1157,1164 ----
  813. X                  if (!u.uswallow &&
  814. X                      (compat = could_seduce(&youmonst,
  815. X                                  mon, mattk)))
  816. X!                 You("%s %s %s.",
  817. X!                     mon->mcansee ? "smile at" : "talk to",
  818. X                      Blind ? "it" : mon_nam(mon),
  819. X                      compat == 2 ? "engagingly" : "seductively");
  820. X                  else if (mattk->aatyp == AT_KICK)
  821. X***************
  822. X*** 1262,1271 ****
  823. X          if(mhit && !rn2(6)) {
  824. X          if (kicked) {
  825. X              if (uarmf)
  826. X!             (void) rust_dmg(uarmf, xname(uarmf), 1, TRUE);
  827. X          } else corrode_weapon();
  828. X          }
  829. X          break;
  830. X        case AD_MAGM:
  831. X          /* wrath of gods for attacking Oracle */
  832. X          if(Antimagic) {
  833. X--- 1285,1315 ----
  834. X          if(mhit && !rn2(6)) {
  835. X          if (kicked) {
  836. X              if (uarmf)
  837. X!             (void) rust_dmg(uarmf, xname(uarmf), 3, TRUE);
  838. X          } else corrode_weapon();
  839. X          }
  840. X          break;
  841. X+       case AD_STON:
  842. X+         if(mhit)
  843. X+           if (!kicked)
  844. X+         if (!uwep && !uarmg
  845. X+ #ifdef POLYSELF
  846. X+             && !resists_ston(uasmon)
  847. X+ #endif
  848. X+            ) {
  849. X+             You("turn to stone...");
  850. X+             done_in_by(mon);
  851. X+             return 2;
  852. X+         }
  853. X+         break;
  854. X+       case AD_RUST:
  855. X+         if(mhit)
  856. X+           if (kicked) {
  857. X+         if (uarmf)
  858. X+             (void) rust_dmg(uarmf, xname(uarmf), 1, TRUE);
  859. X+           } else
  860. X+         corrode_weapon();
  861. X+         break;
  862. X        case AD_MAGM:
  863. X          /* wrath of gods for attacking Oracle */
  864. X          if(Antimagic) {
  865. X***************
  866. X*** 1287,1296 ****
  867. X  
  868. X          switch(ptr->mattk[i].adtyp) {
  869. X  
  870. X!           case AD_PLYS:        /* specifically floating eye */
  871. X!         if(canseemon(mon)) {
  872. X! 
  873. X!             tmp = -d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  874. X              if(mon->mcansee) {
  875. X              if(Reflecting & W_AMUL) {
  876. X                  makeknown(AMULET_OF_REFLECTION);
  877. X--- 1331,1343 ----
  878. X  
  879. X          switch(ptr->mattk[i].adtyp) {
  880. X  
  881. X!           case AD_PLYS:
  882. X!         tmp = -d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  883. X!         if(ptr == &mons[PM_FLOATING_EYE]) {
  884. X!             if (!canseemon(mon)) {
  885. X!             tmp = 0;
  886. X!             break;
  887. X!             }
  888. X              if(mon->mcansee) {
  889. X              if(Reflecting & W_AMUL) {
  890. X                  makeknown(AMULET_OF_REFLECTION);
  891. X***************
  892. X*** 1308,1313 ****
  893. X--- 1355,1364 ----
  894. X              pline("%s cannot defend itself.", Amonnam(mon,"blind"));
  895. X              if(!rn2(500)) change_luck(-1);
  896. X              }
  897. X+         } else { /* gelatinous cube */
  898. X+             You("are frozen by %s!", mon_nam(mon));
  899. X+             nomul(tmp);
  900. X+             tmp = 0;
  901. X          }
  902. X          break;
  903. X            case AD_COLD:        /* brown mold or blue jelly */
  904. X***************
  905. X*** 1350,1361 ****
  906. X          if(monnear(mon, u.ux, u.uy)) {
  907. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  908. X              if(Fire_resistance) {
  909. X!               shieldeff(u.ux, u.uy);
  910. X              You("feel mildly warm.");
  911. X! #ifdef POLYSELF
  912. X! #ifdef GOLEMS
  913. X              ugolemeffects(AD_FIRE, tmp);
  914. X- #endif /* GOLEMS */
  915. X  #endif
  916. X              tmp = 0;
  917. X              break;
  918. X--- 1401,1410 ----
  919. X          if(monnear(mon, u.ux, u.uy)) {
  920. X              tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  921. X              if(Fire_resistance) {
  922. X!             shieldeff(u.ux, u.uy);
  923. X              You("feel mildly warm.");
  924. X! #if defined(POLYSELF) && defined(GOLEMS)
  925. X              ugolemeffects(AD_FIRE, tmp);
  926. X  #endif
  927. X              tmp = 0;
  928. X              break;
  929. X***************
  930. X*** 1364,1369 ****
  931. X--- 1413,1432 ----
  932. X              mdamageu(mon, tmp);
  933. X          }
  934. X          break;
  935. X+           case AD_ELEC:
  936. X+         tmp = d((int)mon->m_lev+1, (int)ptr->mattk[i].damd);
  937. X+         if(Shock_resistance) {
  938. X+             shieldeff(u.ux, u.uy);
  939. X+             You("feel a mild tingle.");
  940. X+ #if defined(POLYSELF) && defined(GOLEMS)
  941. X+             ugolemeffects(AD_ELEC, tmp);
  942. X+ #endif
  943. X+             tmp = 0;
  944. X+             break;
  945. X+         }
  946. X+         You("are jolted with electricity!");
  947. X+         mdamageu(mon, tmp);
  948. X+         break;
  949. X            default:
  950. X          break;
  951. X          }
  952. X***************
  953. X*** 1398,1401 ****
  954. X--- 1461,1487 ----
  955. X          pline("Wait!  That's %s!", defmonnam(mtmp));
  956. X      }
  957. X      wakeup(mtmp);    /* clears mtmp->mimic */
  958. X+ }
  959. X+ 
  960. X+ static void
  961. X+ nohandglow()
  962. X+ {
  963. X+     if (!u.umconf) return; /* for safety */
  964. X+     if (u.umconf == 1) {
  965. X+         if (Blind)
  966. X+             Your("%s stop tingling.", makeplural(body_part(HAND)));
  967. X+         else
  968. X+             Your("%s stop glowing %s.",
  969. X+                 makeplural(body_part(HAND)),
  970. X+                 Hallucination ? hcolor() : red);
  971. X+     } else {
  972. X+         if (Blind)
  973. X+             pline("The tingling in your %s lessens.",
  974. X+                 makeplural(body_part(HAND)));
  975. X+         else
  976. X+             Your("%s no longer glow so brightly %s.",
  977. X+                 makeplural(body_part(HAND)),
  978. X+                 Hallucination ? hcolor() : red);
  979. X+     }
  980. X+     u.umconf--;
  981. X  }
  982. X*** src/Old/unixmain.c    Mon Feb 19 19:06:32 1990
  983. X--- src/unixmain.c    Sun Feb 11 11:29:09 1990
  984. X***************
  985. X*** 7,16 ****
  986. X  
  987. X  #include <signal.h>
  988. X  #include <pwd.h>
  989. X  
  990. X  char SAVEF[PL_NSIZ + 11] = "save/";    /* save/99999player */
  991. X  
  992. X! char *hname = 0;        /* name of the game (argv[0] of call) */
  993. X  char obuf[BUFSIZ];    /* BUFSIZ is defined in stdio.h */
  994. X  int hackpid = 0;                /* current pid */
  995. X  int locknum = 0;                /* max num of players */
  996. X--- 7,19 ----
  997. X  
  998. X  #include <signal.h>
  999. X  #include <pwd.h>
  1000. X+ #ifndef O_RDONLY
  1001. X+ #include <fcntl.h>
  1002. X+ #endif
  1003. X  
  1004. X  char SAVEF[PL_NSIZ + 11] = "save/";    /* save/99999player */
  1005. X  
  1006. X! const char *hname = 0;        /* name of the game (argv[0] of call) */
  1007. X  char obuf[BUFSIZ];    /* BUFSIZ is defined in stdio.h */
  1008. X  int hackpid = 0;                /* current pid */
  1009. X  int locknum = 0;                /* max num of players */
  1010. X***************
  1011. X*** 233,239 ****
  1012. X  #ifdef COMPRESS
  1013. X      Strcpy(old,SAVEF);
  1014. X      Strcat(SAVEF,".Z");
  1015. X!     if((fd = open(SAVEF,0)) >= 0) {
  1016. X           (void) close(fd);
  1017. X          Strcpy(cmd, COMPRESS);
  1018. X          Strcat(cmd, " -d ");    /* uncompress */
  1019. X--- 236,242 ----
  1020. X  #ifdef COMPRESS
  1021. X      Strcpy(old,SAVEF);
  1022. X      Strcat(SAVEF,".Z");
  1023. X!     if((fd = open(SAVEF,O_RDONLY)) >= 0) {
  1024. X           (void) close(fd);
  1025. X          Strcpy(cmd, COMPRESS);
  1026. X          Strcat(cmd, " -d ");    /* uncompress */
  1027. X***************
  1028. X*** 246,252 ****
  1029. X      }
  1030. X      Strcpy(SAVEF,old);
  1031. X  #endif
  1032. X!     if((fd = open(SAVEF,0)) >= 0 &&
  1033. X         (uptodate(fd) || unlink(SAVEF) == 666)) {
  1034. X  #ifdef WIZARD
  1035. X          /* Since wizard is actually flags.debug, restoring might
  1036. X--- 249,256 ----
  1037. X      }
  1038. X      Strcpy(SAVEF,old);
  1039. X  #endif
  1040. X!     if((fd = open(SAVEF,O_RDONLY)) >= 0 &&
  1041. X!        /* if not up-to-date, quietly unlink file via false condition */
  1042. X         (uptodate(fd) || unlink(SAVEF) == 666)) {
  1043. X  #ifdef WIZARD
  1044. X          /* Since wizard is actually flags.debug, restoring might
  1045. X***************
  1046. X*** 254,261 ****
  1047. X           */
  1048. X          boolean remember_wiz_mode = wizard;
  1049. X  #endif
  1050. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1051. X!         pline("Restoring old save file...");
  1052. X          (void) fflush(stdout);
  1053. X          if(!dorecover(fd))
  1054. X              goto not_recovered;
  1055. X--- 258,266 ----
  1056. X           */
  1057. X          boolean remember_wiz_mode = wizard;
  1058. X  #endif
  1059. X+         (void) chmod(SAVEF,0);    /* disallow parallel restores */
  1060. X          (void) signal(SIGINT, (SIG_RET_TYPE) done1);
  1061. X!         pline("Restoring save file...");
  1062. X          (void) fflush(stdout);
  1063. X          if(!dorecover(fd))
  1064. X              goto not_recovered;
  1065. X***************
  1066. X*** 274,279 ****
  1067. X--- 279,297 ----
  1068. X              pline("Do you want to keep the save file? ");
  1069. X              if(yn() == 'n')
  1070. X                  (void) unlink(SAVEF);
  1071. X+             else {
  1072. X+                 (void) chmod(SAVEF,FCMASK); /* back to readable */
  1073. X+ # ifdef COMPRESS
  1074. X+                 Strcpy(cmd, COMPRESS);
  1075. X+                 Strcat(cmd, " ");
  1076. X+ #  ifdef COMPRESS_OPTIONS
  1077. X+                 Strcat(cmd, COMPRESS_OPTIONS);
  1078. X+                 Strcat(cmd, " ");
  1079. X+ #  endif
  1080. X+                 Strcat(cmd,SAVEF);
  1081. X+                 (void) system(cmd);
  1082. X+ # endif
  1083. X+             }
  1084. X          }
  1085. X  #endif
  1086. X          flags.move = 0;
  1087. X***************
  1088. X*** 382,390 ****
  1089. X  
  1090. X          if(dir == NULL)
  1091. X          dir = ".";
  1092. X!         if((fd = open(RECORD, 2)) < 0) {
  1093. X!         Printf("Warning: cannot write %s/%s", dir, RECORD);
  1094. X!         getret();
  1095. X          } else
  1096. X          (void) close(fd);
  1097. X      }
  1098. X--- 400,411 ----
  1099. X  
  1100. X          if(dir == NULL)
  1101. X          dir = ".";
  1102. X!         if((fd = open(RECORD, O_RDWR)) < 0) {
  1103. X!         if((fd = open(RECORD, O_CREAT|O_RDWR, FCMASK)) < 0) {
  1104. X!             Printf("Warning: cannot write %s/%s", dir, RECORD);
  1105. X!             getret();
  1106. X!         } else
  1107. X!             (void) close(fd);
  1108. X          } else
  1109. X          (void) close(fd);
  1110. X      }
  1111. X*** src/Old/unixtty.c    Mon Feb 19 19:06:57 1990
  1112. X--- src/unixtty.c    Sun Jan 21 13:58:48 1990
  1113. X***************
  1114. X*** 115,121 ****
  1115. X  /* reset terminal to original state */
  1116. X  void
  1117. X  settty(s)
  1118. X! char *s;
  1119. X  {
  1120. X      clear_screen();
  1121. X      end_screen();
  1122. X--- 115,121 ----
  1123. X  /* reset terminal to original state */
  1124. X  void
  1125. X  settty(s)
  1126. X! const char *s;
  1127. X  {
  1128. X      clear_screen();
  1129. X      end_screen();
  1130. X***************
  1131. X*** 192,200 ****
  1132. X  /*VARARGS1*/
  1133. X  
  1134. X  void
  1135. X! error VA_DECL(char *,s)
  1136. X      VA_START(s);
  1137. X!     VA_INIT(s, char *);
  1138. X      if(settty_needed)
  1139. X          settty(NULL);
  1140. X      Vprintf(s,VA_ARGS);
  1141. X--- 192,200 ----
  1142. X  /*VARARGS1*/
  1143. X  
  1144. X  void
  1145. X! error VA_DECL(const char *,s)
  1146. X      VA_START(s);
  1147. X!     VA_INIT(s, const char *);
  1148. X      if(settty_needed)
  1149. X          settty(NULL);
  1150. X      Vprintf(s,VA_ARGS);
  1151. X*** src/Old/version.c    Mon Feb 19 19:07:51 1990
  1152. X--- src/version.c    Mon Feb 12 18:47:37 1990
  1153. X***************
  1154. X*** 5,11 ****
  1155. X  #include    "hack.h"
  1156. X  #include    "date.h"
  1157. X  #ifndef BETA
  1158. X! #ifdef MSDOS
  1159. X  # include    "patchlev.h"
  1160. X  #else
  1161. X  # include    "patchlevel.h"
  1162. X--- 5,11 ----
  1163. X  #include    "hack.h"
  1164. X  #include    "date.h"
  1165. X  #ifndef BETA
  1166. X! #if defined(MSDOS) && !defined(AMIGA)
  1167. X  # include    "patchlev.h"
  1168. X  #else
  1169. X  # include    "patchlevel.h"
  1170. X***************
  1171. X*** 51,53 ****
  1172. X--- 51,222 ----
  1173. X          datestring);
  1174. X      return 0;
  1175. X  }
  1176. X+ 
  1177. X+ #define Next_opt(x) if (next_opt(x)) goto quit;
  1178. X+ #define Page_line(x) if (page_line(x)) goto quit;
  1179. X+ 
  1180. X+ int
  1181. X+ doextversion()
  1182. X+ {
  1183. X+     set_pager(0);
  1184. X+     (void)page_line("");
  1185. X+     Page_line("Options compiled into this version of NetHack");
  1186. X+     Page_line("(in no particular order):");
  1187. X+     Page_line("");
  1188. X+ #ifdef POLYSELF
  1189. X+     Next_opt("self-polymorphing, ");
  1190. X+ #endif
  1191. X+ #ifdef THEOLOGY
  1192. X+     Next_opt("theology, ");
  1193. X+ #endif
  1194. X+ #ifdef SOUNDS
  1195. X+     Next_opt("sounds, ");
  1196. X+ #endif
  1197. X+ #ifdef KICK
  1198. X+     Next_opt("kicking, ");
  1199. X+ #endif
  1200. X+ #ifdef THRONES
  1201. X+     Next_opt("thrones, ");
  1202. X+ #endif
  1203. X+ #ifdef FOUNTAINS
  1204. X+     Next_opt("fountains, ");
  1205. X+ #endif
  1206. X+ #ifdef SINKS
  1207. X+     Next_opt("sinks, ");
  1208. X+ #endif
  1209. X+ #ifdef ALTARS
  1210. X+     Next_opt("altars, ");
  1211. X+ #endif
  1212. X+ #ifdef WALLIFIED_MAZE
  1213. X+     Next_opt("fancy mazes, ");
  1214. X+ #endif
  1215. X+ #ifdef REINCARNATION
  1216. X+     Next_opt("Rogue level, ");
  1217. X+ #endif
  1218. X+ #ifdef STRONGHOLD
  1219. X+     Next_opt("special levels, ");
  1220. X+ #endif
  1221. X+ #ifdef ORACLE
  1222. X+     Next_opt("oracle, ");
  1223. X+ #endif
  1224. X+ #ifdef MEDUSA
  1225. X+     Next_opt("Medusa, ");
  1226. X+ #endif
  1227. X+ #ifdef KOPS
  1228. X+     Next_opt("Kops, ");
  1229. X+ #endif
  1230. X+ #ifdef ARMY
  1231. X+     Next_opt("armies, ");
  1232. X+ #endif
  1233. X+ #ifdef WORM
  1234. X+     Next_opt("long worms, ");
  1235. X+ #endif
  1236. X+ #ifdef GOLEMS
  1237. X+     Next_opt("golems, ");
  1238. X+ #endif
  1239. X+ #ifdef INFERNO
  1240. X+     Next_opt("inferno, ");
  1241. X+ #endif
  1242. X+ #ifdef SEDUCE
  1243. X+     Next_opt("seduction, ");
  1244. X+ #endif
  1245. X+ #ifdef TOLKIEN
  1246. X+     Next_opt("Tolkien extras, ");
  1247. X+ #endif
  1248. X+ #ifdef PROBING
  1249. X+     Next_opt("wand of probing, ");
  1250. X+ #endif
  1251. X+ #ifdef WALKIES
  1252. X+     Next_opt("leashes, ");
  1253. X+ #endif
  1254. X+ #ifdef SHIRT
  1255. X+     Next_opt("Hawaiian shirt, ");
  1256. X+ #endif
  1257. X+ #ifdef MUSIC
  1258. X+     Next_opt("music, ");
  1259. X+ #endif
  1260. X+ #ifdef TUTTI_FRUTTI
  1261. X+     Next_opt("fruits, ");
  1262. X+ #endif
  1263. X+ #ifdef SPELLS
  1264. X+     Next_opt("spells, ");
  1265. X+ #endif
  1266. X+ #ifdef NAMED_ITEMS
  1267. X+     Next_opt("named items, ");
  1268. X+ #endif
  1269. X+ #ifdef ELBERETH
  1270. X+     Next_opt("Elbereth, ");
  1271. X+ #endif
  1272. X+ #ifdef EXPLORE_MODE
  1273. X+     Next_opt("explore mode, ");
  1274. X+ #endif
  1275. X+ #ifdef HARD
  1276. X+     Next_opt("HARD, ");
  1277. X+ #endif
  1278. X+ #ifdef REDO
  1279. X+     Next_opt("redo-commands, ");
  1280. X+ #endif
  1281. X+ #ifdef CLIPPING
  1282. X+     Next_opt("screen clipping, ");
  1283. X+ #endif
  1284. X+ #ifdef TEXTCOLOR
  1285. X+     Next_opt("color, ");
  1286. X+ #endif
  1287. X+ #ifdef DGK
  1288. X+     Next_opt("Don Kneller's enhancements, ");
  1289. X+ #endif
  1290. X+ #ifdef OVERLAY
  1291. X+     Next_opt("overlays, ");
  1292. X+ #endif
  1293. X+ #ifdef SHELL
  1294. X+     Next_opt("shell command, ");
  1295. X+ #endif
  1296. X+ #ifdef MAIL
  1297. X+     Next_opt("mail, ");
  1298. X+ #endif
  1299. X+ #ifdef NEWS
  1300. X+     Next_opt("news file, ");
  1301. X+ #endif
  1302. X+ #ifdef COM_COMPL
  1303. X+     Next_opt("command line completion, ");
  1304. X+ #endif
  1305. X+ #ifdef AMIGA_WBENCH
  1306. X+     Next_opt("Amiga WorkBench support, ");
  1307. X+ #endif
  1308. X+ #ifdef WIZARD
  1309. X+     Next_opt("wizard mode, ");
  1310. X+ #endif
  1311. X+ #ifdef LOGFILE
  1312. X+     Next_opt("logfile, ");
  1313. X+ #endif
  1314. X+ #ifdef TERMLIB
  1315. X+     Next_opt("termcap file, ");
  1316. X+ #endif
  1317. X+ #ifdef TERMINFO
  1318. X+     Next_opt("terminfo, ");
  1319. X+ #endif
  1320. X+ #ifdef ANSI_DEFAULT
  1321. X+     Next_opt("ANSI default terminal, ");
  1322. X+ #endif
  1323. X+ #ifdef COMPRESS
  1324. X+     Next_opt("compress bones/level/save files, ");
  1325. X+ #endif
  1326. X+     Next_opt("basic NetHack features");
  1327. X+     Next_opt("");
  1328. X+     set_pager(1);
  1329. X+     return 0;
  1330. X+ quit:
  1331. X+     (void) next_opt("\033");
  1332. X+     set_pager(2);
  1333. X+     return 0;
  1334. X+ }
  1335. X+ 
  1336. X+ #ifdef MSDOS
  1337. X+ int
  1338. X+ comp_times(filetime)
  1339. X+ long filetime;
  1340. X+ {
  1341. X+     if(filetime < compiletime) return (1);
  1342. X+     else return (0);
  1343. X+ }
  1344. X+ #endif
  1345. X*** src/Old/weapon.c    Mon Feb 19 19:08:10 1990
  1346. X--- src/weapon.c    Thu Jan 25 22:14:52 1990
  1347. X***************
  1348. X*** 9,14 ****
  1349. X--- 9,16 ----
  1350. X   */
  1351. X  #include    "hack.h"
  1352. X  
  1353. X+ #ifdef OVLB
  1354. X+ 
  1355. X  static const char kebabable[] = { S_XORN, S_DRAGON, S_NAGA, S_GIANT, 0 };
  1356. X  
  1357. X  /*
  1358. X***************
  1359. X*** 168,173 ****
  1360. X--- 170,178 ----
  1361. X      return;
  1362. X  }
  1363. X  
  1364. X+ #endif /* OVLB */
  1365. X+ #ifdef OVL0
  1366. X+ 
  1367. X  #define    Oselect(x)    if((otmp = m_carrying(mtmp, x))) return(otmp);
  1368. X  
  1369. X  #ifdef TOLKIEN
  1370. X***************
  1371. X*** 352,357 ****
  1372. X--- 357,365 ----
  1373. X      else return(sbon+ACURR(A_DEX)-14);
  1374. X  }
  1375. X  
  1376. X+ #endif /* OVL0 */
  1377. X+ #ifdef OVL1
  1378. X+ 
  1379. X  int
  1380. X  dbon() {    /* damage bonus for strength */
  1381. X  #ifdef POLYSELF
  1382. X***************
  1383. X*** 367,369 ****
  1384. X--- 375,379 ----
  1385. X      else if(ACURR(A_STR) < 118) return(5);    /* up to 18/99 */
  1386. X      else return(6);
  1387. X  }
  1388. X+ 
  1389. X+ #endif /* OVL1 */
  1390. X*** src/Old/were.c    Mon Feb 19 19:08:33 1990
  1391. X--- src/were.c    Thu Jan 25 22:14:54 1990
  1392. X***************
  1393. X*** 4,9 ****
  1394. X--- 4,13 ----
  1395. X  
  1396. X  #include    "hack.h"
  1397. X  
  1398. X+ static int FDECL(counter_were,(int));
  1399. X+ 
  1400. X+ #ifdef OVL0
  1401. X+ 
  1402. X  void
  1403. X  were_change(mon)
  1404. X  register struct monst *mon;
  1405. X***************
  1406. X*** 22,27 ****
  1407. X--- 26,34 ----
  1408. X          } else if(!rn2(30) || Protection_from_shape_changers) new_were(mon);
  1409. X  }
  1410. X  
  1411. X+ #endif /* OVL0 */
  1412. X+ #ifdef OVLB
  1413. X+ 
  1414. X  static int
  1415. X  counter_were(pm)
  1416. X  int pm;
  1417. X***************
  1418. X*** 108,110 ****
  1419. X--- 115,119 ----
  1420. X      (void) polymon(u.ulycn);
  1421. X  }
  1422. X  #endif
  1423. X+ 
  1424. X+ #endif /* OVLB */
  1425. X*** src/Old/wield.c    Mon Feb 19 19:08:53 1990
  1426. X--- src/wield.c    Sun Jan 21 13:58:49 1990
  1427. X***************
  1428. X*** 65,71 ****
  1429. X          You("wield the cockatrice corpse in your bare %s.",
  1430. X              makeplural(body_part(HAND)));
  1431. X          You("turn to stone...");
  1432. X!         killer="cockatrice corpse";
  1433. X          done(STONING);
  1434. X      } else if(uarms && bimanual(wep))
  1435. X          You("cannot wield a two-handed %s and hold a shield.",
  1436. X--- 65,72 ----
  1437. X          You("wield the cockatrice corpse in your bare %s.",
  1438. X              makeplural(body_part(HAND)));
  1439. X          You("turn to stone...");
  1440. X!         killer_format = KILLED_BY;
  1441. X!         killer="touching a cockatrice corpse";
  1442. X          done(STONING);
  1443. X      } else if(uarms && bimanual(wep))
  1444. X          You("cannot wield a two-handed %s and hold a shield.",
  1445. X***************
  1446. X*** 114,120 ****
  1447. X      else if (uwep->spe > -6) {
  1448. X          Your("%s!", aobjnam(uwep, "corrode"));
  1449. X          uwep->spe--;
  1450. X!     } else    Your("%s quite rusted now.", aobjnam(uwep, "look"));
  1451. X  }
  1452. X  
  1453. X  int
  1454. X--- 115,121 ----
  1455. X      else if (uwep->spe > -6) {
  1456. X          Your("%s!", aobjnam(uwep, "corrode"));
  1457. X          uwep->spe--;
  1458. X!     } else    Your("%s quite rusted now.", aobjnam(uwep, Blind ? "feel" : "look"));
  1459. X  }
  1460. X  
  1461. X  int
  1462. X***************
  1463. X*** 124,132 ****
  1464. X  {
  1465. X      register const char *color = Hallucination ? hcolor() :
  1466. X                       (amount < 0) ? black : blue;
  1467. X!     register char *xtime;
  1468. X  
  1469. X!     if(!uwep || (uwep->olet != WEAPON_SYM && uwep->otyp != PICK_AXE)) {
  1470. X          char buf[36];
  1471. X  
  1472. X          Sprintf(buf, "Your %s %s.", makeplural(body_part(HAND)),
  1473. X--- 125,134 ----
  1474. X  {
  1475. X      register const char *color = Hallucination ? hcolor() :
  1476. X                       (amount < 0) ? black : blue;
  1477. X!     register const char *xtime;
  1478. X  
  1479. X!     if(!uwep || (uwep->olet != WEAPON_SYM && uwep->otyp != PICK_AXE
  1480. X!             && uwep->otyp != UNICORN_HORN)) {
  1481. X          char buf[36];
  1482. X  
  1483. X          Sprintf(buf, "Your %s %s.", makeplural(body_part(HAND)),
  1484. X***************
  1485. X*** 145,151 ****
  1486. X  
  1487. X      if(uwep->otyp == CRYSKNIFE && amount < 0) {
  1488. X          uwep->otyp = WORM_TOOTH;
  1489. X!         Your("weapon looks duller now.");
  1490. X          return(1);
  1491. X      }
  1492. X  #endif
  1493. X--- 147,153 ----
  1494. X  
  1495. X      if(uwep->otyp == CRYSKNIFE && amount < 0) {
  1496. X          uwep->otyp = WORM_TOOTH;
  1497. X!         Your("weapon seems duller now.");
  1498. X          return(1);
  1499. X      }
  1500. X  #endif
  1501. X*** src/Old/wizard.c    Mon Feb 19 19:09:10 1990
  1502. X--- src/wizard.c    Tue Feb 13 18:41:41 1990
  1503. X***************
  1504. X*** 1,4 ****
  1505. X! /*    SCCS Id: @(#)wizard.c    3.0    88/04/11
  1506. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1507. X  /* NetHack may be freely redistributed.  See license for details. */
  1508. X  
  1509. X--- 1,4 ----
  1510. X! /*    SCCS Id: @(#)wizard.c    3.0    90/01/09
  1511. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1512. X  /* NetHack may be freely redistributed.  See license for details. */
  1513. X  
  1514. X***************
  1515. X*** 8,13 ****
  1516. X--- 8,15 ----
  1517. X  
  1518. X  #include "hack.h"
  1519. X  
  1520. X+ #ifdef OVLB
  1521. X+ 
  1522. X  #ifdef HARD
  1523. X  /*    TODO:    Expand this list.    */
  1524. X  static const int nasties[] = {
  1525. X***************
  1526. X*** 20,30 ****
  1527. X      };
  1528. X  #endif /* HARD */
  1529. X  
  1530. X! /*    TODO:    investigate this. */
  1531. X! static const char wizapp[] = {
  1532. X!     S_HUMAN, S_DEMON, S_VAMPIRE, S_DRAGON, S_TROLL, S_UMBER,
  1533. X!     S_XORN, S_XAN, S_COCKATRICE, S_EYE, S_NAGA, S_TRAPPER,
  1534. X!     /* '1' /* Historical reference */ };
  1535. X  
  1536. X  /* If he has found the Amulet, make the wizard appear after some time */
  1537. X  void
  1538. X--- 22,38 ----
  1539. X      };
  1540. X  #endif /* HARD */
  1541. X  
  1542. X! static const unsigned wizapp[] = {
  1543. X!     PM_HUMAN, PM_WATER_DEMON, PM_VAMPIRE,
  1544. X!     PM_RED_DRAGON, PM_TROLL, PM_UMBER_HULK,
  1545. X!     PM_XORN, PM_XAN, PM_COCKATRICE,
  1546. X!     PM_FLOATING_EYE,
  1547. X!     PM_GUARDIAN_NAGA,
  1548. X!     PM_TRAPPER
  1549. X! };
  1550. X! 
  1551. X! #endif /* OVLB */
  1552. X! #ifdef OVL0
  1553. X  
  1554. X  /* If he has found the Amulet, make the wizard appear after some time */
  1555. X  void
  1556. X***************
  1557. X*** 39,51 ****
  1558. X              if(u.uhave_amulet) {
  1559. X              mtmp->msleep = 0;
  1560. X              if(dist(mtmp->mx,mtmp->my) > 2)
  1561. X!                 pline(
  1562. X!     "You get the creepy feeling that somebody noticed your taking the Amulet."
  1563. X                  );
  1564. X              return;
  1565. X              }
  1566. X  }
  1567. X  
  1568. X  int
  1569. X  mon_has_amulet(mtmp)
  1570. X  register struct monst *mtmp;
  1571. X--- 47,62 ----
  1572. X              if(u.uhave_amulet) {
  1573. X              mtmp->msleep = 0;
  1574. X              if(dist(mtmp->mx,mtmp->my) > 2)
  1575. X!                 You(
  1576. X!     "get the creepy feeling that somebody noticed your taking the Amulet."
  1577. X                  );
  1578. X              return;
  1579. X              }
  1580. X  }
  1581. X  
  1582. X+ #endif /* OVL0 */
  1583. X+ #ifdef OVLB
  1584. X+ 
  1585. X  int
  1586. X  mon_has_amulet(mtmp)
  1587. X  register struct monst *mtmp;
  1588. X***************
  1589. X*** 86,91 ****
  1590. X--- 97,105 ----
  1591. X                  /* teleport to it and pick it up */
  1592. X                  remove_monster(mtmp->mx, mtmp->my);
  1593. X                  place_monster(mtmp, otmp->ox, otmp->oy);
  1594. X+                 if (cansee(mtmp->mx, mtmp->my))
  1595. X+                 pline("%s picks up %s.", Monnam(mtmp),
  1596. X+                                 xname(otmp));
  1597. X                  freeobj(otmp);
  1598. X                  mpickobj(mtmp, otmp);
  1599. X                  pmon(mtmp);
  1600. X***************
  1601. X*** 100,106 ****
  1602. X      /* secondary goal - stayin' alive */
  1603. X  
  1604. X      /* if wounded, hole up on or near the stairs (to block them) */
  1605. X!     if(mtmp->mhp < 20 + rnd(10))
  1606. X          if (mtmp->mx != xupstair && mtmp->my != yupstair)
  1607. X          mnearto(mtmp,xupstair,yupstair,TRUE);
  1608. X  
  1609. X--- 114,121 ----
  1610. X      /* secondary goal - stayin' alive */
  1611. X  
  1612. X      /* if wounded, hole up on or near the stairs (to block them) */
  1613. X!     /* unless, of course, there are no stairs (e.g. endlevel */
  1614. X!     if(mtmp->mhp < 20 + rnd(10) && (xupstair || yupstair))
  1615. X          if (mtmp->mx != xupstair && mtmp->my != yupstair)
  1616. X          mnearto(mtmp,xupstair,yupstair,TRUE);
  1617. X  
  1618. X***************
  1619. X*** 131,138 ****
  1620. X  
  1621. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1622. X          mtmp->msleep = 0;
  1623. X!         if(mtmp->mfroz && !rn2(5))
  1624. X!             mtmp->mfroz = 0;
  1625. X      }
  1626. X  }
  1627. X  
  1628. X--- 146,155 ----
  1629. X  
  1630. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
  1631. X          mtmp->msleep = 0;
  1632. X!         if(!mtmp->mcanmove && !rn2(5)) {
  1633. X!             mtmp->mfrozen = 0;
  1634. X!             mtmp->mcanmove = 1;
  1635. X!         }
  1636. X      }
  1637. X  }
  1638. X  
  1639. X***************
  1640. X*** 148,153 ****
  1641. X--- 165,171 ----
  1642. X              mtmp2->minvent->spe = -1;
  1643. X          }
  1644. X          unpmon(mtmp2);
  1645. X+         mtmp2->m_ap_type = M_AP_MONSTER;
  1646. X          mtmp2->mappearance = wizapp[rn2(SIZE(wizapp))];
  1647. X          pmon(mtmp2);
  1648. X      }
  1649. X***************
  1650. X*** 262,308 ****
  1651. X  
  1652. X  const char *random_malediction[] = {
  1653. X      "Hell shall soon claim thy remains,",
  1654. X!     "I chortle at thee, pathetic",
  1655. X!     "Prepare to die,",
  1656. X      "Resistance is useless,",
  1657. X      "Surrender or die, thou",
  1658. X!     "There shall be no mercy, yon",
  1659. X      "Thou shalt repent of thy cunning,",
  1660. X      "Thou art as a flea to me,",
  1661. X      "Thou art doomed,",
  1662. X      "Thy fate is sealed,",
  1663. X      "Verily, thou shalt be one dead"
  1664. X! /*    "Go play leapfrog with a unicorn,", */
  1665. X  };
  1666. X  
  1667. X! /* Insult the player */
  1668. X  void
  1669. X  cuss(mtmp)
  1670. X  register struct monst    *mtmp;
  1671. X  {
  1672. X!     switch (rn2(5)) {
  1673. X!         case 0: pline("%s casts aspersions on your ancestry.",
  1674. X!               Monnam(mtmp));
  1675. X!             break;
  1676. X!         case 1: pline("%s laughs fiendishly.", /* typical bad guy action */
  1677. X!               Monnam(mtmp));
  1678. X!             break;
  1679. X!         default:
  1680. X!             if (u.uhave_amulet && !rn2(SIZE(random_insult)))
  1681. X!             pline("\"Relinquish the amulet, %s!\"",
  1682. X!                   random_insult[rn2(SIZE(random_insult))]);
  1683. X!             else if (u.uhp < 5 && !rn2(2))    /* Panic */
  1684. X!             pline(rn2(2) ?
  1685. X!                 "\"Even now thy life force ebbs, %s!\"" :
  1686. X!                 "\"Savor thy breath, %s, it be thine last!\"",
  1687. X!                   random_insult[rn2(SIZE(random_insult))]);
  1688. X!             else if (mtmp->mhp < 5 && !rn2(2))    /* Parthian shot */
  1689. X!             pline(rn2(2) ?
  1690. X!                 "\"I shall return.\"" :
  1691. X!                 "\"I'll be back.\"");
  1692. X!             else
  1693. X!             pline("\"%s %s!\"",
  1694. X!                   random_malediction[rn2(SIZE(random_malediction))],
  1695. X!                   random_insult[rn2(SIZE(random_insult))]);
  1696. X      }
  1697. X  }
  1698. X--- 280,357 ----
  1699. X  
  1700. X  const char *random_malediction[] = {
  1701. X      "Hell shall soon claim thy remains,",
  1702. X!     "I chortle at thee, thou pathetic",
  1703. X!     "Prepare to die, thou ",
  1704. X      "Resistance is useless,",
  1705. X      "Surrender or die, thou",
  1706. X!     "There shall be no mercy, thou",
  1707. X      "Thou shalt repent of thy cunning,",
  1708. X      "Thou art as a flea to me,",
  1709. X      "Thou art doomed,",
  1710. X      "Thy fate is sealed,",
  1711. X      "Verily, thou shalt be one dead"
  1712. X! };
  1713. X! 
  1714. X! #ifdef SOUNDS
  1715. X! const char *demonic_malediction[] = {
  1716. X!     "I first mistook thee for a statue, when I regarded thy head of stone.",
  1717. X!     "Come here often?",
  1718. X!     "Dost pain excite thee?  Wouldst thou prefer the whip?",
  1719. X!     "Thinkest thou it shall tickle as I rip out thy lungs?",
  1720. X!     "Eat slime and die!",
  1721. X!     "Go ahead, fetch thy mama!  I shall wait.",
  1722. X!     "Go play leapfrog with a herd of unicorns!",
  1723. X!     "Hast thou been drinking, or art thou always so clumsy?",
  1724. X!     "This time I shall let thee off with a spanking, but let it not happen again.",
  1725. X!     "I've met smarter (and prettier) acid blobs.",
  1726. X!     "Look!  Thy bootlace is undone!",
  1727. X!     "Mercy!  Dost thou wish me to die of laughter?",
  1728. X!     "Run away!  Live to flee another day!",    
  1729. X!     "Thou hadst best fight better than thou canst dress!",
  1730. X!     "Twixt thy cousin and thee, Medusa is the prettier.",
  1731. X!     "Methinks thou wert unnaturally interested in yon corpse back there, eh, varlet?",
  1732. X!     "Up thy nose with a rubber hose!",
  1733. X!     "Verily, thy corpse could not smell worse!",
  1734. X!     "Wait!  I shall polymorph into a grid bug to give thee a fighting chance!",
  1735. X!     "Why search for the Amulet?  Thou wouldst but lose it, cretin.",
  1736. X  };
  1737. X+ #endif
  1738. X  
  1739. X! /* Insult or intimidate the player */
  1740. X  void
  1741. X  cuss(mtmp)
  1742. X  register struct monst    *mtmp;
  1743. X  {
  1744. X! #ifdef SOUNDS
  1745. X!     if (mtmp->iswiz) {
  1746. X! #endif
  1747. X!         if (!rn2(5))  /* typical bad guy action */
  1748. X!         pline("%s laughs fiendishly.", Monnam(mtmp));
  1749. X!         else 
  1750. X!         if (u.uhave_amulet && !rn2(SIZE(random_insult)))
  1751. X!             pline("\"Relinquish the amulet, %s!\"",
  1752. X!               random_insult[rn2(SIZE(random_insult))]);
  1753. X!         else if (u.uhp < 5 && !rn2(2))    /* Panic */
  1754. X!             pline(rn2(2) ?
  1755. X!               "\"Even now thy life force ebbs, %s!\"" :
  1756. X!               "\"Savor thy breath, %s, it be thine last!\"",
  1757. X!               random_insult[rn2(SIZE(random_insult))]);
  1758. X!         else if (mtmp->mhp < 5 && !rn2(2))    /* Parthian shot */
  1759. X!             verbalize(rn2(2) ?
  1760. X!                   "I shall return." :
  1761. X!                   "I'll be back.");
  1762. X!         else
  1763. X!             pline("\"%s %s!\"",
  1764. X!               random_malediction[rn2(SIZE(random_malediction))],
  1765. X!               random_insult[rn2(SIZE(random_insult))]);
  1766. X! #ifdef SOUNDS
  1767. X!     } else {
  1768. X!         if (!rn2(5))
  1769. X!         kludge("%s casts aspersions on your ancestry.", Monnam(mtmp));
  1770. X!         else
  1771. X!         verbalize(demonic_malediction[rn2(SIZE(demonic_malediction))]);
  1772. X      }
  1773. X+ #endif
  1774. X  }
  1775. X+ 
  1776. X+ #endif /* OVLB */
  1777. X*** src/Old/worm.c    Mon Feb 19 19:09:31 1990
  1778. X--- src/worm.c    Sun Jan 28 19:32:59 1990
  1779. X***************
  1780. X*** 7,12 ****
  1781. X--- 7,36 ----
  1782. X  #ifdef WORM
  1783. X  #include "wseg.h"
  1784. X  
  1785. X+ static void FDECL(remseg,(struct monst *,struct wseg *));
  1786. X+ 
  1787. X+ /* Each tailed worm has a wormno.  This is used as an index for the following
  1788. X+  * arrays:
  1789. X+  * wsegs: the start of a a linked list of segments, located at the tail.
  1790. X+  * wheads: the end of a linked list of segments, located at the head.  Putting
  1791. X+  *    the tail of the list at the head of the worm and vice versa is an
  1792. X+  *    endless source of confusion, but necessary.  From now on, we will use
  1793. X+  *    "start" and "end" to refer to the list, and "head" and "tail" to refer
  1794. X+  *    to the worm.
  1795. X+  * wgrowtime: obvious.
  1796. X+  *
  1797. X+  * When a worm is moved, we add a new segment at the head (end of the list)
  1798. X+  * and (unless we want it to grow) delete the segment at the tail (beginning
  1799. X+  * of the list).  This new head segment is located in the same square as
  1800. X+  * the actual head of the worm (thus requiring a special case when setting
  1801. X+  * level.monsters upon worm movement).  If we do want to grow the worm, we
  1802. X+  * don't delete the tail segment, and we give the worm extra hit points,
  1803. X+  * which possibly go into its maximum.
  1804. X+  *
  1805. X+  * Non-moving worms (worm_nomove) shrink instead of grow as their tails keep
  1806. X+  * going while their heads are stopped short.  Delete the tail segment,
  1807. X+  * and remove hit points from the worm.
  1808. X+  */
  1809. X  struct wseg *wsegs[32] = DUMMY, *wheads[32] = DUMMY, *m_atseg = 0;
  1810. X  long wgrowtime[32] = DUMMY;
  1811. X  
  1812. X***************
  1813. X*** 193,199 ****
  1814. X--- 217,231 ----
  1815. X          wsegs[tmp2] = wsegs[tmp];
  1816. X          wgrowtime[tmp2] = 0;
  1817. X      }
  1818. X+     /* do-loop: go from the tail to the head.  Segments close to the tail
  1819. X+      * either die or become part of worm 2.  We stop at the hit segment
  1820. X+      * and this loop never goes down the entire length of the worm.
  1821. X+      */
  1822. X      do {
  1823. X+         /* The segment immediately next to (tailwards) the one hit, */
  1824. X+         /* becoes the head of the new second worm.  Note: at this point, */
  1825. X+         /* wtmp->nseg is the one you hit, wtmp is immediately tailwards, */
  1826. X+         /* and wtmp->nseg->nseg is immediately headwards. */
  1827. X          if(wtmp->nseg->wx == x && wtmp->nseg->wy == y){
  1828. X          if(tmp2) wheads[tmp2] = wtmp;
  1829. X          wsegs[tmp] = wtmp->nseg->nseg;
  1830. X***************
  1831. X*** 202,208 ****
  1832. X          if(tmp2) {
  1833. X              kludge("You cut %s in half.", mon_nam(mtmp));
  1834. X          /* devalue the monster level of both halves of the worm */
  1835. X!             mtmp->m_lev = (mtmp->m_lev <= 2) ? 2 : mtmp->m_lev - 2;
  1836. X              mtmp2->m_lev = mtmp->m_lev;
  1837. X          /* calculate the mhp on the new (lower) monster level */
  1838. X              mtmp2->mhpmax = mtmp2->mhp = d((int)mtmp2->m_lev, 8);
  1839. X--- 234,240 ----
  1840. X          if(tmp2) {
  1841. X              kludge("You cut %s in half.", mon_nam(mtmp));
  1842. X          /* devalue the monster level of both halves of the worm */
  1843. X!             mtmp->m_lev = (mtmp->m_lev <= 3) ? 2 : mtmp->m_lev - 2;
  1844. X              mtmp2->m_lev = mtmp->m_lev;
  1845. X          /* calculate the mhp on the new (lower) monster level */
  1846. X              mtmp2->mhpmax = mtmp2->mhp = d((int)mtmp2->m_lev, 8);
  1847. X***************
  1848. X*** 219,226 ****
  1849. X--- 251,261 ----
  1850. X          mtmp->mhp /= 2;
  1851. X          return;
  1852. X          }
  1853. X+     /* Worm segments which are closer to the tail than the one you hit, */
  1854. X+     /* get either deleted or transferred from the old to new worms */
  1855. X          wtmp2 = wtmp->nseg;
  1856. X          if(!tmp2) remseg(mtmp, wtmp);
  1857. X+         else place_worm_seg(mtmp2, wtmp->wx, wtmp->wy);
  1858. X          wtmp = wtmp2;
  1859. X      } while(wtmp->nseg);
  1860. X      panic("Cannot find worm segment");
  1861. X*** src/Old/worn.c    Mon Feb 19 19:09:52 1990
  1862. X--- src/worn.c    Mon Jan 22 21:02:41 1990
  1863. X***************
  1864. X*** 35,42 ****
  1865. X  register struct obj *obj;
  1866. X  long mask;
  1867. X  {
  1868. X!     register struct worn *wp;
  1869. X!     register struct obj *oobj;
  1870. X  
  1871. X      for(wp = worn; wp->w_mask; wp++) if(wp->w_mask & mask) {
  1872. X          oobj = *(wp->w_obj);
  1873. X--- 35,42 ----
  1874. X  register struct obj *obj;
  1875. X  long mask;
  1876. X  {
  1877. X!     register const struct worn *wp;
  1878. X!     register struct obj *oobj = 0;
  1879. X  
  1880. X      for(wp = worn; wp->w_mask; wp++) if(wp->w_mask & mask) {
  1881. X          oobj = *(wp->w_obj);
  1882. X***************
  1883. X*** 71,87 ****
  1884. X       */
  1885. X      if (Inhell && !Fire_resistance) {
  1886. X          pline(crispy);
  1887. X!         killer = "loss of fire protection";
  1888. X          done(BURNING);
  1889. X          /* If we're here they survived with life saving, so put the
  1890. X           * weapon they just unwielded back in their hands...
  1891. X           */
  1892. X!         if (oobj->otyp != DRAGON_SCALE_MAIL
  1893. X                  && oobj->otyp != RIN_FIRE_RESISTANCE
  1894. X  #ifdef NAMED_ITEMS
  1895. X                  && !defends(AD_FIRE, oobj)
  1896. X  #endif
  1897. X!                 && oobj->corpsenm != PM_RED_DRAGON)
  1898. X              impossible("lost FR from a non-FR item?");
  1899. X          setworn(oobj, mask);
  1900. X      }
  1901. X--- 71,88 ----
  1902. X       */
  1903. X      if (Inhell && !Fire_resistance) {
  1904. X          pline(crispy);
  1905. X!         killer_format = NO_KILLER_PREFIX;
  1906. X!         killer = self_pronoun("lost %s fire protection in hell","his");
  1907. X          done(BURNING);
  1908. X          /* If we're here they survived with life saving, so put the
  1909. X           * weapon they just unwielded back in their hands...
  1910. X           */
  1911. X!         if (!oobj || (oobj->otyp != DRAGON_SCALE_MAIL
  1912. X                  && oobj->otyp != RIN_FIRE_RESISTANCE
  1913. X  #ifdef NAMED_ITEMS
  1914. X                  && !defends(AD_FIRE, oobj)
  1915. X  #endif
  1916. X!                 && oobj->corpsenm != PM_RED_DRAGON))
  1917. X              impossible("lost FR from a non-FR item?");
  1918. X          setworn(oobj, mask);
  1919. X      }
  1920. X***************
  1921. X*** 92,98 ****
  1922. X  setnotworn(obj)
  1923. X  register struct obj *obj;
  1924. X  {
  1925. X!     register struct worn *wp;
  1926. X  
  1927. X      if (!obj) return;
  1928. X      for(wp = worn; wp->w_mask; wp++)
  1929. X--- 93,99 ----
  1930. X  setnotworn(obj)
  1931. X  register struct obj *obj;
  1932. X  {
  1933. X!     register const struct worn *wp;
  1934. X  
  1935. X      if (!obj) return;
  1936. X      for(wp = worn; wp->w_mask; wp++)
  1937. X***************
  1938. X*** 111,117 ****
  1939. X       */
  1940. X      if (Inhell && !Fire_resistance && obj->olet != AMULET_SYM) {
  1941. X          pline(crispy);
  1942. X!         killer = "loss of fire protection";
  1943. X          done(BURNING);
  1944. X          /* Survived with lifesaving, etc...; there's no general way
  1945. X           * to undo the setnotworn()--we can't re-wear/wield the
  1946. X--- 112,119 ----
  1947. X       */
  1948. X      if (Inhell && !Fire_resistance && obj->olet != AMULET_SYM) {
  1949. X          pline(crispy);
  1950. X!         killer_format = NO_KILLER_PREFIX;
  1951. X!         killer = self_pronoun("lost %s fire protection in hell","his");
  1952. X          done(BURNING);
  1953. X          /* Survived with lifesaving, etc...; there's no general way
  1954. X           * to undo the setnotworn()--we can't re-wear/wield the
  1955. X*** src/Old/search.c    Mon Feb 19 18:58:10 1990
  1956. X--- src/search.c    Sat Feb  3 21:37:33 1990
  1957. X***************
  1958. X*** 7,12 ****
  1959. X--- 7,16 ----
  1960. X  #  include "artifact.h"
  1961. X  #endif
  1962. X  
  1963. X+ static void FDECL(findone,(XCHAR_P,XCHAR_P,int *));
  1964. X+ 
  1965. X+ #ifdef OVLB
  1966. X+ 
  1967. X  static void
  1968. X  findone(zx,zy,num)
  1969. X  xchar zx,zy;
  1970. X***************
  1971. X*** 66,78 ****
  1972. X      num = 0;
  1973. X      for(zy = ly; zy <= hy; zy++)
  1974. X          for(zx = lx; zx <= hx; zx++)
  1975. X!             findone(zx,zy,&num);
  1976. X      for(zy = ly2; zy <= hy2; zy++)
  1977. X          for(zx = lx2; zx <= hx2; zx++)
  1978. X!             findone(zx,zy,&num);
  1979. X      return(num);
  1980. X  }
  1981. X  
  1982. X  int
  1983. X  dosearch()
  1984. X  {
  1985. X--- 70,87 ----
  1986. X      num = 0;
  1987. X      for(zy = ly; zy <= hy; zy++)
  1988. X          for(zx = lx; zx <= hx; zx++)
  1989. X!             if(isok(zx,zy))
  1990. X!                 findone(zx,zy,&num);
  1991. X      for(zy = ly2; zy <= hy2; zy++)
  1992. X          for(zx = lx2; zx <= hx2; zx++)
  1993. X!             if(isok(zx,zy))
  1994. X!                 findone(zx,zy,&num);
  1995. X      return(num);
  1996. X  }
  1997. X  
  1998. X+ #endif /* OVLB */
  1999. X+ #ifdef OVL1
  2000. X+ 
  2001. X  int
  2002. X  dosearch()
  2003. X  {
  2004. X***************
  2005. X*** 98,104 ****
  2006. X              pline("What are you looking for?  The exit?");
  2007. X      } else
  2008. X          for(x = u.ux-1; x < u.ux+2; x++)
  2009. X!           for(y = u.uy-1; y < u.uy+2; y++)
  2010. X          if(x != u.ux || y != u.uy) {
  2011. X              if(levl[x][y].typ == SDOOR) {
  2012. X  #ifdef NAMED_ITEMS
  2013. X--- 107,114 ----
  2014. X              pline("What are you looking for?  The exit?");
  2015. X      } else
  2016. X          for(x = u.ux-1; x < u.ux+2; x++)
  2017. X!           for(y = u.uy-1; y < u.uy+2; y++) {
  2018. X!         if(!isok(x,y)) continue;
  2019. X          if(x != u.ux || y != u.uy) {
  2020. X              if(levl[x][y].typ == SDOOR) {
  2021. X  #ifdef NAMED_ITEMS
  2022. X***************
  2023. X*** 153,158 ****
  2024. X--- 163,169 ----
  2025. X                          You("find %s posing as a statue.",
  2026. X                            defmonnam(mtmp));
  2027. X                      delobj(otmp);
  2028. X+                     newsym(x, y);
  2029. X                        }
  2030. X                      deltrap(trap);
  2031. X                      return(1);
  2032. X***************
  2033. X*** 164,172 ****
  2034. X--- 175,187 ----
  2035. X                  }
  2036. X              }
  2037. X          }
  2038. X+           }
  2039. X      return(1);
  2040. X  }
  2041. X  
  2042. X+ #endif /* OVL1 */
  2043. X+ #ifdef OVLB
  2044. X+ 
  2045. X  int
  2046. X  doidtrap() {
  2047. X      register struct trap *trap;
  2048. X***************
  2049. X*** 180,186 ****
  2050. X              if(u.dz)
  2051. X              if((u.dz < 0) != (is_maze_lev && trap->ttyp == TRAPDOOR))
  2052. X                  continue;
  2053. X!             pline("That is a%s.",traps[ Hallucination ? rn2(TRAPNUM-3)+2 :
  2054. X              trap->ttyp]);
  2055. X              return 0;
  2056. X          }
  2057. X--- 195,201 ----
  2058. X              if(u.dz)
  2059. X              if((u.dz < 0) != (is_maze_lev && trap->ttyp == TRAPDOOR))
  2060. X                  continue;
  2061. X!             pline("That is a%s.",traps[ Hallucination ? rn2(TRAPNUM-3)+3 :
  2062. X              trap->ttyp]);
  2063. X              return 0;
  2064. X          }
  2065. X***************
  2066. X*** 188,193 ****
  2067. X--- 203,211 ----
  2068. X      return 0;
  2069. X  }
  2070. X  
  2071. X+ #endif /* OVLB */
  2072. X+ #ifdef OVL0
  2073. X+ 
  2074. X  void
  2075. X  wakeup(mtmp)
  2076. X  register struct monst *mtmp;
  2077. X***************
  2078. X*** 198,203 ****
  2079. X--- 216,224 ----
  2080. X      if(mtmp->mimic) seemimic(mtmp);
  2081. X  }
  2082. X  
  2083. X+ #endif /* OVL0 */
  2084. X+ #ifdef OVLB
  2085. X+ 
  2086. X  /* NOTE: we must check if(mtmp->mimic) before calling this routine */
  2087. X  void
  2088. X  seemimic(mtmp)
  2089. X***************
  2090. X*** 204,210 ****
  2091. X--- 225,234 ----
  2092. X  register struct monst *mtmp;
  2093. X  {
  2094. X      mtmp->mimic = 0;
  2095. X+     mtmp->m_ap_type = M_AP_NOTHING;
  2096. X      mtmp->mappearance = 0;
  2097. X      unpmon(mtmp);
  2098. X      pmon(mtmp);
  2099. X  }
  2100. X+ 
  2101. X+ #endif /* OVLB */
  2102. X
  2103. END_OF_FILE
  2104. if test 54742 -ne `wc -c <'patch7.09'`; then
  2105.     echo shar: \"'patch7.09'\" unpacked with wrong size!
  2106. fi
  2107. # end of 'patch7.09'
  2108. echo shar: End of archive 13 \(of 30\).
  2109. cp /dev/null ark13isdone
  2110. MISSING=""
  2111. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ; do
  2112.     if test ! -f ark${I}isdone ; then
  2113.     MISSING="${MISSING} ${I}"
  2114.     fi
  2115. done
  2116. if test "${MISSING}" = "" ; then
  2117.     echo You have unpacked all 30 archives.
  2118.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2119. else
  2120.     echo You still need to unpack the following archives:
  2121.     echo "        " ${MISSING}
  2122. fi
  2123. ##  End of shell archive.
  2124. exit 0
  2125.